var HApplication = new Class();

var ZebraTable = new Class({
	//initialization
	initialize: function(table_class) {
				
		//add table shading
		$$('table.' + table_class + ' tr').each(function(el,i) {
						
			//do regular shading
			var _class = i % 2 ? 'even' : 'odd'; el.addClass(_class);
							
			//do mouseover
			el.addEvent('mouseenter',function() { if(!el.hasClass('highlight')) { el.addClass('mo').removeClass(_class); } });
							
			//do mouseout
			el.addEvent('mouseleave',function() { if(!el.hasClass('highlight')) { el.removeClass('mo').addClass(_class); } });
							
			//do click
			el.addEvent('click',function() {
				//click off
				if(el.hasClass('highlight'))
				{
					el.removeClass('highlight').addClass(_class);
				}
				//clock on
				else
				{
					el.removeClass(_class).removeClass('mo').addClass('highlight');
				}
			});
						
		});
     }
});

initializeWindows = function(){
<#include "about.ftl">
//退出
<#include "logout.ftl">


	// Build windows onLoad
	MUI.parametricsWindow();

	MUI.myChain.callChain();
}

<#include "layout.ftl">

// Initialize MochaUI when the DOM is ready
window.addEvent('domready', function(){
	MUI.myChain = new Chain();
	MUI.myChain.chain(
		function(){MUI.Desktop.initialize();},
		function(){MUI.Dock.initialize();},
		function(){initializeColumns();},		
		function(){initializeWindows();}		
	).callChain();	
	
});
